
/**
 * Write a description of class Beamer here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Beamer extends Item
{
    private Room loadedRoom;

    /**
     * Constructor for objects of class Beamer
     */
    public Beamer(String name, String description, int weight, int strength)
    {
        super(name, description, weight, strength);
    }

    /**
     * Puts the current room into the memory of the device
     * @param roomToLoad The room that has to be loaded
     */
    public void load(Room roomToLoad)
    {
        loadedRoom = roomToLoad;
    }
    
    /**
     * Checks if the device is loaded
     * @return true if it is, else false.
     */
    public boolean isLoaded()
    {
        if(loadedRoom == null)
        {
            return false;
        }
        
        return true;
    }
    
    /**
     * Return the player to the rememberd room.
     * @return The loaded room or null if it's empty
     */
    public Room getLoadedRoom()
    {
        if(isLoaded())
        {
            return loadedRoom;
        }
        else
        {
            return null;
        }
    }
}
